package com.shop.domain.pink;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.*;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;

/**
 * <p>UserPinkInfo 实体类</p>
 * <p>Table: t_user_pink_info - 用户拼团信息表</p>
 * @author generator
 * @date 2021-02-23 10:47:57
 */
@ApiModel("UserPinkInfo 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_user_pink_info")
@SQLDelete(sql = "update t_user_pink_info set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class UserPinkInfo extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 用户id
	 */
    @ApiModelProperty("用户id")
	@Column(name = "uid")
    private Long uid;

    /**
	 * 拼团id
	 */
    @ApiModelProperty("拼团id")
	@Column(name = "pink_id")
    private Long pinkId;

    /**
	 * 总拼中次数
	 */
    @ApiModelProperty("总拼中次数")
	@Column(name = "all_pz_num")
    private Integer allPzNum;

    /**
	 * 总未拼中次数
	 */
    @ApiModelProperty("总未拼中次数")
	@Column(name = "all_not_pz_num")
    private Integer allNotPzNum;

    /**
	 * 第几轮拼团
	 */
    @ApiModelProperty("第几轮拼团")
	@Column(name = "pt_num")
    private Integer ptNum;

    /**
	 * 单轮拼团未拼中次数
	 */
    @ApiModelProperty("单轮拼团未拼中次数")
	@Column(name = "pt_round_num")
    private Integer ptRoundNum;

    /**
	 * 修改时间
	 */
    @ApiModelProperty("修改时间")
	@Column(name = "update_time")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
	 * 寄售次数
	 */
    @ApiModelProperty("寄售次数")
	@Column(name = "jishou_num")
    private Integer jishouNum;

    /**
	 * 提货次数
	 */
    @ApiModelProperty("提货次数")
	@Column(name = "get_goods_num")
    private Integer getGoodsNum;

    /**
	 * 是否删除
	 */
    @ApiModelProperty("是否删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;

    /**
	 * 是否续拼 0 关闭 1打开
	 */
    @ApiModelProperty("是否续拼 0 关闭 1打开")
	@Column(name = "is_auto_pt")
    private Integer isAutoPt;

    /**
	 * 续拼产品ID
	 */
    @ApiModelProperty("续拼产品ID")
	@Column(name = "auto_product_id")
    private Long autoProductId;

    /**
	 * 续拼产品规格ID
	 */
    @ApiModelProperty("续拼产品规格ID")
	@Column(name = "auto_product_attr_value_id")
    private Long autoProductAttrValueId;

    /**
	 * 续拼失败原因
	 */
    @ApiModelProperty("续拼失败原因")
	@Column(name = "auto_fail_msg")
    private String autoFailMsg;

    /**
	 * 续拼时间
	 */
    @ApiModelProperty("续拼时间")
	@Column(name = "auto_time")
    private Date autoTime;

    /**
     * 最后拼团时间
     */
    @ApiModelProperty("最后拼团时间")
    @Column(name = "last_pink_time")
    private Date lastPinkTime;

    /**
     * 续拼产品ID
     */
    @ApiModelProperty("续拼地址ID")
    @Column(name = "auto_address_id")
    private Long autoAddressId;


}